package com.zhixin.fans.ks.ui.history;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import com.zhixin.fans.ks.R;
import com.zhixin.fans.ks.api.res.OrderHistory;

import java.util.List;

import android.support.annotation.Nullable;

public class OrderHistoryAdapter extends BaseQuickAdapter<OrderHistory, BaseViewHolder> {
    public OrderHistoryAdapter(@Nullable List<OrderHistory> data) {
        super(R.layout.item_coin_history, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, OrderHistory item) {

        helper.setText(R.id.tv_oder_name, item.getGoods_name())
                .setText(R.id.tv_oder_time, item.getAdd_time())
                .setText(R.id.tv_oder_desc, item.getDesc())
                .setText(R.id.tv_oder_money, String.format("%s粉币", item.getMoney()));

    }
}
